/**
 * Created by CK on 2017/3/1.
 */
 var list;
$(document).ready(function () {
    list = $('#List');
    $('.xh-datagrid-toolbar').parseToolbar(afterParseToolbar);
    $('.xh-form').parseForm($('#bt_form_add, #bt_form_edit'));
    var iSysTrId = xhTool.getQuery('iSysTrId');
	var viewType = xhTool.getQuery('viewType');
    var queryParams = {
        iSysTrId: iSysTrId,
		viewType:viewType,
    };
    list.initDataGrid(baseUrl + 'Statsexplain/getTeacherRecList', {queryParams: queryParams}).setSelectThenEnable(['bt_list_del', 'bt_list_Publish']);
	DataGrid.onDblClickRow = function(rowIndex, rowData){
        window.top.xhTop.createNewTab('题目录制详情', baseUrl + 'Statsexplain/teacherTopicView?iSysTrId=' + rowData.iSysTrId + '&iCreateUserId=' + rowData.iCreateUserId + '&sTitle=' + (rowData.sUserName+'-'+rowData.sSysTrName), true);
    };



});

function afterParseToolbar()
{
    $.overtFun.vagueSearch(list);
}
